<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/10/20
 * Time: 18:09
 */

namespace App\Transformers;


use App\Models\AdminUser;
use League\Fractal\TransformerAbstract;

class AdminuserTransformer extends TransformerAbstract
{
    public function transform(AdminUser $adminUser){
        return[
            'username' => $adminUser->username,
            'password' => md5($adminUser->password),
            'created_at' => $adminUser->created_at->toDateTimeString(),
            'updated_at' => $adminUser->updated_at->toDateTimeString(),

        ];
    }
}